import java.io.File;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Vector;

import javax.swing.AbstractButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;

import jpcap.*;

public class Configuration implements IConfiguration
{
	String device;
	final int totalProtocolsNum=4;
	int[] pFilter;
	Vector<String> ipFilter;
	
	public Configuration(String dev,int[] protocols,Vector<String> ips)
	{
		this.pFilter=new int[totalProtocolsNum];
		
		for(int i=0;i<totalProtocolsNum;i++)
			this.pFilter[i]=protocols[i];
		
		this.device=dev;
		this.ipFilter=ips;
	}
	
	@Override
	public Enumeration<NetworkInterface> getDevList() throws SocketException {
		Enumeration<NetworkInterface> devices=NetworkInterface.getNetworkInterfaces();
		
		return devices;
	}

	@Override
	public void loadSettingsFromFile(File filename) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void saveSettingsToFile(Configuration config,File filename) {
		// TODO Auto-generated method stub
		//config=new this(new ConfigLoader());
	}

	@Override
	public void setProtocolFilter(int[] pFilter) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setIpFilter(String ipFilter) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setDevice(String device) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String getDevice() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int[] getProtocolFilter() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Vector<String> getIpFilter() {
		// TODO Auto-generated method stub
		return null;
	}
	
}
